Skip to main content
POST
/
api
/
portrait
/
editing
/
try-on-clothes-pro
Try on Clothes Pro
curl --request POST \
  --url https://www.ailabapi.com/api/portrait/editing/try-on-clothes-pro \
  --header 'Content-Type: multipart/form-data' \
  --header 'ailabapi-api-key: <api-key>' \
  --form task_type=async \
  --form resolution=-1 \
  --form restore_face=true \
  --form person_image=@example-file \
  --form top_garment=@example-file \
  --form bottom_garment=@example-file
{
  "request_id": "",
  "log_id": "",
  "error_code": 0,
  "error_code_str": "",
  "error_msg": "",
  "error_detail": {
    "status_code": 200,
    "code": "",
    "code_message": "",
    "message": ""
  },
  "task_type": "",
  "task_id": ""
}

Authorizations

ailabapi-api-key
string
header
required

API Key for authentication

Body

multipart/form-data
task_type
string

Task Type. <li>async: Asynchronous tasks.</li>

Example:

"async"

person_image
file

Portrait image.

top_garment
file

Upper Body Clothing Image.

resolution
number

Output Image Resolution. If you need to call Try on Clothes Refiner in the future, select -1. <li>-1: Original image resolution.</li> <li>1024: 576x1024px.</li> <li>1280: 720x1280px.</li>

Example:

"-1"

restore_face
boolean

Whether to Keep the Model’s Face. If you need to call Try on Clothes Refiner in the future, select true. <li>true: Keep the model’s original face.</li> <li>false: Regenerate the model’s face.</li>

Example:

"true"

bottom_garment
file

Lower Body Clothing Image. <li>If no lower body clothing image is provided, the lower body clothing effect will be randomly generated.</li> <li>If lower body clothing is not needed (e.g., when the upper body garment is a dress), this value should be left empty.</li>

Response

200 - application/json

Success

The response is of type object.